var Logout = function(){
  return{
    logout:function(){
      $.ajax({
        url: "http://localhost:8080/LeaveMng/users/logout",
        type: 'get',
        dataType:'JSON'
      }).success(function(data){
        if(data.state == 200) {
          window.location.href = "./";
        }else{
          alert("注销失败！");
        }
      }).error(function(data){
        console.log(data);
      });
    }
  }
}();